package cn.bigcontainer.alt.calendar.extension.impl;

import java.util.Map;

import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

import cn.bigcontainer.alt.calendar.dto.MCalendarEvent;
import cn.bigcontainer.alt.calendar.extension.MCalendarEventListProcessor;
import cn.bigcontainer.alt.common.util.WoKit;

/**
 * @author jiaod
 *
 */
@Component
@Primary
public class MCalendarEventListProcessorDefault implements MCalendarEventListProcessor {

	@Override
	public MCalendarEvent process(MCalendarEvent event, String id, String[] subAppIds, String start, String end,
			Map<String, Object> req) {
		if (WoKit.isEmpty(event.getTitle())) {
			event.setTitle(event.getCjrXm());
		}
		return event;
	}

}
